home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / basic / pbc22a.zip / PBCLONE.DOC < prev    next >
Text File  |  1993-04-25  |  54KB  |  1,160 lines

  1.                      The PBClone Library
  2.                    =---------------------=
  3.                          Version 2.2
  4.  
  5.     PBCLONE  Copyright (c) 1990-1993  Thomas G. Hanlin III
  6.  
  7.  
  8.  
  9. Use of LIBMAT or LIBWIZ is strongly recommended for creating
  10. the initial PBClone library.  You should be able to get these
  11. utilities from the same place you got this library.
  12.  
  13. This is PBClone, a library of over 610 assembly language and
  14. BASIC routines for use with Microsoft's BASIC compilers:
  15. Bascom, PDS, QuickBasic and Visual BASIC for DOS.  The PBClone
  16. collection is copyrighted and may be distributed only under the
  17. following conditions:
  18.  
  19.    All PBClone files must be distributed together as a unit.
  20.    No files may be altered, added, or deleted from this unit.
  21.    Assembly language source code may not be distributed.
  22.  
  23. YOU USE THIS LIBRARY AT YOUR OWN RISK.  I have tested it on my
  24. own computer, but I will not assume any responsibility for any
  25. problems which PBClone may cause you.  If you do run into a
  26. problem, please let me know about it, and I will do my best to
  27. verify and repair it.
  28.  
  29. It is expected that if you find PBClone useful, you will
  30. register your copy.  You may not use PBClone routines in
  31. programs intended for sale unless you have registered.
  32.  
  33. Registration gets you the latest version of PBClone, complete
  34. with full source code.  The assembly language code is designed
  35. for MASM 6.0 and may require alteration for other assemblers.
  36.  
  37. You will need to have a complete set of PBClone .OBJ files for
  38. LibWiz to work.  Create a fresh subdirectory and extract the
  39. BASIC sources from PBC$BAS.ZIP (or .LZH, etc).  Compile them
  40. all.  The following DOS command will do it:
  41.  
  42.    FOR %x IN (*.BAS) DO BC %x /o;
  43.  
  44. Now extract the .OBJ files from PBC$MAIN.LIB into the same
  45. directory, using the UnLib utility that comes with LibWiz.
  46. Finally, extract the .OBJ files from PBC$NEAR.LIB as well. This
  47. gives you a complete set of .OBJs for PBClone, allowing LibWiz
  48. to create a custom PBClone library for you.
  49.  
  50. The VB-DOS compiler always uses far strings.  For it, you must
  51. use the .OBJs from PBC$FAR.LIB instead of PBC$NEAR.LIB.
  52.  
  53. With PDS, you have a choice between near and far strings.  To
  54. use far strings, use the /FS switch when compiling, and use the
  55. .OBJs from PBC$FAR.LIB instead of PBC$NEAR.LIB.
  56.  
  57.                      Creating .QLB files
  58.  
  59.  
  60.  
  61. If you like to use the BASIC editor/environment, you will need
  62. to create a .QLB version of the library to complement the .LIB
  63. version.  LIBWIZ can do it for you, or you can do it manually.
  64. This is done using the LINK.EXE utility that came with your
  65. compiler.  The exact parameters differ slightly depending on
  66. which version of the compiler you have.  For QuickBasic, it
  67. looks something like this:
  68.  
  69.    LINK libname.LIB/Q/SE:1024,libname.QLB,NUL,BQLB45;
  70.  
  71. The BQLB45 file is for QuickBasic 4.5.  This should be replaced
  72. by BQLB40 or BQLB41 for QuickBasic 4.0 (check your files to see
  73. which you have).  For BASCOM 6.0-7.1, also called Professional
  74. Development System or PDS, use QBXQLB instead of BQLB45.  For
  75. VB-DOS, use VBDOSQLB instead of BQLB45.
  76.  
  77. Since you'll probably want to do this again in the future when
  78. you get a new version of BasWiz or PBClone, I'd suggest you
  79. create a batch file or alias to do the work for you.  If you
  80. have 4DOS, an alias such as the following will do it:
  81.  
  82.    ALIAS QLB LINK %%1.LIB/Q/SE:1024,%%1.QLB,NUL,BQLB45;
  83.  
  84. In this case, you can do the conversion simply by typing:
  85.  
  86.    QLB libname
  87.  
  88.                      The TSR File Viewer
  89.  
  90.  
  91.  
  92. Since there are hundreds of routines in PBClone, it isn't
  93. always exactly easy to remember which routine you want or how
  94. to use it.  This is a particular problem when you're in the
  95. middle of writing a program.  So, I've written a TSR file
  96. viewer... it's crude, but it gets the job done.
  97.  
  98. Just type "FV" to install the TSR.  Alt-V activates it.  "FV
  99. /D" removes it from memory.
  100.  
  101.      !!! ----== NOTE ==---- !!!
  102. Please check FV with a nonessential application first!  It
  103. appears to work fine in the QuickBasic environment, but it
  104. locks up my favorite editor, so I can't guarantee that it will
  105. behave properly in all circumstances.
  106.  
  107. First, FV will ask you for the file to view.  This may contain
  108. drive and subdirectory information as well as the file name.
  109. Second, you will be asked for a search string.  If you enter a
  110. search string, viewing will start at the part of the file that
  111. contains that search string.  If you just press enter, viewing
  112. will start at the beginning of the file.  The file will be
  113. presented to you one page at a time.  I suggest viewing
  114. PBCLONE.DOC or PBCLONE.INF.
  115.  
  116. FV was written in BASIC using Crescent's P.D.Q. library, with
  117. the "simplified" TSR handler (which doesn't seem to have been
  118. entirely debugged).  Then again, TSRs are a tricky matter,
  119. especially with BASIC...
  120.  
  121.                         General Notes
  122.  
  123.  
  124.  
  125. The initial version of PBClone had only one manual.  However,
  126. since there are so many routines, I've split the manual into a
  127. general documentation file and a reference manual.  You won't
  128. want to print PBCLONE.MAN unless you have a lot of time and
  129. printer paper!  In contrast, this file (PBCLONE.DOC) has been
  130. kept small to allow ready printing.  It contains general notes,
  131. cross-reference listings of the routines, and assorted charts.
  132.  
  133. Many of the routines in PBClone are similar to routines of the
  134. same name in ADVBAS and/or ProBas.  The key here is "similar"--
  135. they don't necessarily work the same way and may not produce
  136. the same results.  If you intend to convert from ADVBAS or
  137. ProBas to PBClone, read the documentation carefully.
  138.  
  139. When a PBClone returns a Boolean (on or off) value, it will
  140. always be 0 if off, -1 if on; this is unlike ProBas, which
  141. would often return any non-zero value for an "on" state.
  142. Booleans passed to PBClone may still use any non-zero value to
  143. indicate a "true" or "on" condition, however.
  144.  
  145. Critical error handling has been incorporated into all disk and
  146. device routines.  You will never have to worry about "R>etry,
  147. A>bort, I>gnore" again, so long as you use PBClone for your
  148. disk and device management.
  149.  
  150. PBClone file handling is very flexible but may be confusing to
  151. people used to BASIC's strongly-moded files.  PBClone file
  152. handling is most similar to BASIC files opened in BINARY mode.
  153. You may read or write any amount of information at a time.
  154. After each read or write takes place, the file pointer is
  155. updated appropriately, so you can use sequential access
  156. techniques without further effort.  Random access is also
  157. possible, using FSetLoc/FSetOfs/FSetRec to set the file pointer
  158. position.  Those of you who are familiar with C or Pascal file
  159. handling will notice strong similarities in this approach,
  160. which is based on techniques that have long been standard in
  161. the industry.
  162.  
  163. Many routines are available both as SUBprograms and as
  164. FUNCTIONs.  The former is for compatibility with older programs
  165. which were designed before BASIC was capable of using
  166. FUNCTIONs.  You may use either, of course, although the
  167. FUNCTION version of a routine is often more convenient.
  168.  
  169.                         General Notes
  170.  
  171.  
  172.  
  173. The PBClone library can be used in conjunction with other
  174. libraries.  If there is a conflict in routine names between the
  175. two libraries, the OBJTOOL utility can be used to rename one or
  176. the other routine.  Due to the large size of PBClone, you will
  177. probably need to select just the routines you need, rather than
  178. combining the entire libraries, in order to avoid overflowing
  179. LINK limitations.  OBJTOOL can help you find out which routines
  180. are in what modules.  The LIB utility can be used to alter
  181. existing libraries, or you can build your own custom libraries
  182. from the ground up, using LibWiz.  See the LIB_BI.DOC and
  183. LIBRARY.TXT files if you are not familiar with libraries.
  184.  
  185. LibMatic, LibWiz and ObjTool are included on the sampler disk
  186. that comes with the registered version of PBClone.  They should
  187. also be available at your local BBS.
  188.  
  189. If you have not used ADVBAS, ProBas, or PBClone before, you may
  190. be unfamiliar with